Detect planes in the real world
Now that a basic scene has been set up, you can start on developing the game. In this step, you will detect planes and draw them to the scene.
Add an PlaneDetector component​
An PlaneDetector detects and creates, updates, and removes game objects when the device's understanding of the environment changes.
-
Using the Hierarchy pane, create an empty
GameObject. -
Rename it to
PlaneDetector. This component will display planes until one is selected by the player. -
Select the new game object. Within the Inspector pane, click Add Component to add a
PlaneDetector
-
Configure the
PlaneDetectorby setting theDetected Plane Prefabfield:
- Click the button next to
Noneto bring up the Select GameObject window. - Select the Assets tab and search for WoodenPlaneVisualizer.
​ 
This prefab from the starter package provides a wooden floor texture that will be used as the plane decoration.
Run the app​
-
Build and deploy your app as described in Step 7 and 8 in Getting Started with NRSDK to test your changes
-
Point your glasses at a horizontal real-world surface and move your glasses around to improve NRSDK's understanding of the world.
-
When NRSDK has detected a plane, you should see a wood texture cover real-world surfaces. The
Plane Detectorinstantiates the givenDetected Plane Prefabfor each detected plane.